class Person {
   public readonly name: string // readonly修饰的属性是只读属性
   public age: number

    constructor(name: string, age: number) {
        this.name = name
        this.age = age
    }
}

const p: Person = new Person("陶品奇", 22)
// p.name="codeyWhy" 只读属性不能进行写入操作
p.age=32
console.log(p)